package com.bw.database.table

import androidx.room.TypeConverter
import com.blankj.utilcode.util.GsonUtils

/**
 * 数据库字段转换
 */
class CustomTypeConverters{
    @TypeConverter
    fun arrayListToString(list:ArrayList<String>):String{
        return GsonUtils.toJson(list)
    }
    fun stringToArrsyList(json:String):ArrayList<String> {
        return GsonUtils.fromJson(json,ArrayList::class.java) as ArrayList<String>
    }
}
